//
//  MineSetTVCell.m
//  Shine
//
//  Created by dllo on 16/3/11.
//  Copyright © 2016年 王斌. All rights reserved.
//

#import "MineSetTVCell.h"
#define WIDTHCVCELL self.contentView.frame.size.width
#define HEIGHTCVCELL self.contentView.frame.size.height
@implementation MineSetTVCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createCell];
    }
    return self;
}

- (void)createCell{
    
    self.nowWeightLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.nowWeightLabel];
    
    self.nowWeightNumberLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.nowWeightNumberLabel];
    
    self.buttonSetWeight = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.contentView addSubview:self.buttonSetWeight];
    
    self.buttonWeightChange = [UIButton buttonWithType:UIButtonTypeSystem];
    [self.contentView addSubview:self.buttonWeightChange];
    
    self.hiddenLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.hiddenLabel];
    
    self.bmiButton = [UIButton buttonWithType:UIButtonTypeSystem];
    [self.contentView addSubview:self.bmiButton];
    [self.bmiButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    
}

- (void)layoutSubviews{
    [super layoutSubviews];
    self.nowWeightLabel.frame = CGRectMake(20, 30, 100, 30);
    self.nowWeightNumberLabel.frame = CGRectMake(20, 60, 100, 70);
    self.buttonSetWeight.frame = CGRectMake(WIDTHCVCELL-80, 20, 50, 50);
    self.hiddenLabel.frame = CGRectMake(WIDTHCVCELL-120, 70, 80, 20);
    self.buttonWeightChange.frame = CGRectMake(WIDTHCVCELL-120, 100, 80, 20);
    self.bmiButton.frame = CGRectMake(0, 130, 100, 30);
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
